\rcube_spellchecker_engine

Interface class for a spell-checking backend

Summary

Methods
Properties
Constants
__construct()
languages()
check()
get_suggestions()
get_words()
error()
No public properties found
MAX_SUGGESTIONS
No protected methods found
$lang
$error
$dictionary
$separator
N/A
No private methods found
No private properties found
N/A

Constants

MAX_SUGGESTIONS

MAX_SUGGESTIONS = 10

Properties

$lang

$lang

$error

$error

$dictionary

$dictionary

$separator

$separator

Methods

__construct()

__construct(mixed  $dict, mixed  $lang) : mixed

Default constructor

Parameters

mixed $dict
mixed $lang

Returns

mixed —

languages()

languages() : array

Return a list of languages supported by this backend

Returns

array —

Indexed list of language codes

check()

check(string  $text) : bool

Set content and check spelling

Parameters

string $text

Text content for spellchecking

Returns

bool —

True when no misspelling found, otherwise false

get_suggestions()

get_suggestions(string  $word) : array

Returns suggestions for the specified word

Parameters

string $word

The word

Returns

array —

Suggestions list

get_words()

get_words(string  $text = null) : array

Returns misspelled words

Parameters

string $text

The content for spellchecking. If empty content used for check() method will be used.

Returns

array —

List of misspelled words

error()

error() : string

Returns error message

Returns

string —

Error message